function startRequest()
{
  tfUserText = document.getElementById('tfUser').value;
  tfPassText = document.getElementById('tfPass').value;
  
  var akcja = "";
  if(document.getElementById('rbAdd').checked){
    akcja = "add";
  }
  else if(document.getElementById('rbRemove').checked){
    akcja = "remove";
  }
  else if(document.getElementById('rbModify').checked){
    akcja = "modify";
  }
  else{
    alert("Prosz zaznaczy jedn z opcji.");
    return;
  }

  url = "http://localhost/dane.php?user=" + tfUserText;
  url += "&pass=" + tfPassText + "&akcja=" + akcja;
  url = encodeURI(url);

  var btnWykonaj = document.getElementById('btnWykonaj');
  btnWykonaj.disabled = true;

  startGETRequest(url, onComplete, onEnd);
}

function onComplete(text, xml)
{
  alert(text);
}

function onEnd()
{
  var btnWykonaj = document.getElementById('btnWykonaj');
  btnWykonaj.disabled = false;
}